<template>
	<view class="share-component">
		<button open-type="share" class="clear-normal-style basic-btn btn-share">
			<image src="/static/icon/share.png" style="width: 30px;height: 30px;"></image>
		</button>
	</view>
</template>


<script>
	export default {
		mounted(){
			uni.showShareMenu({
				withShareTicket:true, 
				menus:["shareAppMessage"] //  shareTimeline: 分享到朋友圈shareAppMessage： 发送给朋友
			})
		},
		methods: {
			onShareAppMessage(res) {
				// const shareCode = this.shareCodeInfo.sharecode
				if(res.from === 'button'){
					return {
						title:`全能媒资助手`,
						imageUrl:"",
						path:`/pages/tabbar/home/index`
					}
				}
				return {
					title:`全能媒资助手`,
					imageUrl:"",
					path:`/pages/tabbar/home/index`
				}
			},
		}
	}
</script>


<style scoped lang="scss">
	
	.share-component{
		.clear-normal-style {
			// background: none; /* 去除背景颜色 */  
			// border: none; /* 去除边框 */  
			padding: 0; /* 去除内边距 */  
			// font: inherit; /* 继承父元素的字体样式 */  
			color: inherit; /* 继承父元素的颜色 */  
			cursor: pointer; /* 鼠标悬停时显示指针 */  
			outline: none; /* 去除点击时的焦点框 */  
		}
		.basic-btn{
			width: 40px;
			height: 40px;
			border-radius: 20px;
			background-color: #2E2E38;
			display: flex;
			align-items: center;
			justify-content: center;
		}
	}
</style>

